# encoding: utf-8
""" 
@version: v1.0 
@author: autumner 
@license: Apache Licence  
@contact: 18322313385@163.com 
@site:  https://gitee.com/autumner/pythoncookbook
@software: PyCharm 
@file: net_rpcserver_client.py 
@time: 2019/7/12 下午12:08
"""
'''
远程方法调用客户端
'''
from multiprocessing.connection import Client
from net_rpcserver_proxy import RPCProxy

c = Client(('localhost', 17000), authkey=b'peekaboo')
proxy = RPCProxy(c)
print(proxy.add(2, 3))
print(proxy.sub(2, 3))
print(proxy.sub([1, 3, 4] - 4))